<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" import="java.sql.*" pageEncoding="utf-8"%>
<html>
<head>
<title>页面</title>
<style type="text/css">
/*top*/
body{margin:0 auto;padding:0 auto;text-align: center;width:980px;}

span{font-size:13px;}

table{border:1px dashed white;background: white;}

.content{float: right;top: -180px;position: relative;}

.info{margin-left: 800px;}

.div_content table{border:1px solid white;background: white;}/*/////////////////////////////////////////////////////*/

td{border: 1px dashed gray;}

ul, li { list-style:none;}

a { text-decoration:none;}

.nav {margin-top: -10px;margin-left: 50px;}/*////////////////////////////////////////////////*/

.jieshao{float: left;position: relative;left: 200px;}

.nav ul li { float:left;}

.nav ul li a { width:120px; height:40px; text-align:center; line-height:40px; display:block; border-right:2px solid #ccc; background:#eee; color:#666;}

.nav ul li a:hover{ color:#f00;background: #000000;}

.nav ul li ul { position:absolute; display:none;}

.nav ul li ul li { float:none;}

.nav ul li ul li a { border-right:none; border-top:1px dotted #ccc; background:#f5f5f5;}

.nav ul li:hover ul{ display:block; }

.top{margin: 5px auto 0px auto;padding: 0px;width:980px;height:78px;text-align: left;}

.logo{margin-right: 900px;}

.banner{width: 307px;height: 61px;float:left;margin-top: -10px;}

.options{float: right;margin: -20px;}

.home,.shu,.fav{float: leftmargin: 0 16px;padding:0 0 auto auto;display: inline;padding: 0px 0px;margin-right: 20px;}

.home a,.shu a,.fav a{color: #9b9b9b;float: left;margin-left: 15px;margin-top: -10px;}
/*top*/
.content{margin: 80px 0px ; }

h1{ background:black; font-size:14px; height:35px; line-height:35px; padding-right:900px; color:white;margin-top: 80px;}

.tuichu{position: relative;left: 450px;color:gray;}

#Methods1{ width:900px;height:110px; background:#ccc;}

#Methods1 dl{margin:0px 10px 0 10px; float:left; border:1px solid gray;}

#Methods1 dt{width:180px; margin:10px; height:90px; background:#FFF;}

#Methods1 dd{width:180px; margin:0 0 10px 10px; height:20px; line-height:30px; background:#FFFFFF; text-align:center;}

.td1{margin-top: 0px;}

.td2{margin-top: 0px;}

.td3{margin-top: 0px;}

.td4{margin-top: 0px;}

.td1 .td1_content{float: left;}

.tips{margin-top: 0px;margin-right: 170px;}

.tips span{color:gray;font-size: 13px;}

.tips ul{margin-right: 50px;}

hr{border:1px dashed gray;}

/*nav*/
</style>

</head>
  <body>
  <%!
	    String id;
	    String publisher;
	    String idAfter;%>
	       <%
	    id=request.getParameter("id");
	    System.out.println(id);
	     %>
	    <% 
		String driverClass="com.mysql.jdbc.Driver";
	    String url="jdbc:mysql://localhost:3306/vote?useSSL=false";
	    String user="root";
	    String password="womenilu2580";
	    Class.forName(driverClass);
	    Connection conn=DriverManager.getConnection(url,user,password);
	    Statement stat=conn.createStatement();	 
	    String sql="select publisher from news where id='"+id+"'";
	    ResultSet rs=stat.executeQuery(sql);
	    while(rs.next()){
	    publisher=rs.getString("publisher");
	    %> 	    
  <%@ include file="dengluPublic.jsp" %>
 <%@ include file="daohangPublic.jsp"%>
   <h1><font>与<%=publisher %>聊天</font></h1>
   <font class="tuichu"><a href="scienceNews.jsp">退出登录</a></font>
<div id="Methods1">
	<table width="980px">
<tr>
	<td width="225px">
		<div class="td1">
			<dl>
		    	<dt><a href="#"><img src="img/logo.jpg" width="180px" height="90px" /></a></dt>
		    	<dd>-用户-：<a><%=publisher %></a></dd>
		    </dl>
	    </div>	 
	    <div class="div_content">
     <hr/>
     <iframe src="msgs.jsp" width="100%" height="80%" frameborder="0"></iframe>
       <form action="chatAction.jsp" name="form1" method="post">
       <table width="980px">
       <tr>
       <td>
     输入聊天信息：<input name="msg" type="text" size="40"/>
     <input type="submit" value="发送"/></td>
     </tr>
     </table>     
     </form>
		</div> 
	    		    
	</td>
</tr>
</table>
<%
}
 %>
<hr/>
本站由Dany团队搭建，欢迎有兴趣的朋友加入我们，一起建造更优质的平台
<br/>
作者联系方式：1029046433(qq)
</div>
  </body>
</html>
